from JCI_Controller import *
from JCI_APIs import *

from apscheduler.schedulers.background import BackgroundScheduler

# 测试自动更新
# BlockingScheduler
# scheduler = BackgroundScheduler(timezone="Asia/Shanghai")
# # update_list_contents()
# # 表示每隔3天17时19分07秒执行一次任务sched.add_job(my_job, 'interval',days  = 03,hours = 17,minutes = 19,seconds = 07)
# scheduler.add_job(update_list_contents, 'interval', hours=1, next_run_time=datetime.now())
# scheduler.start()
# while True:
#     print('main 1 hours')
#     time.sleep(3600)

# 单条测试
# print(get_jci_contents(1056,36851))
# print(get_jci_contents(1056,37884))

# 采集列表配置数据
# column_data_handler()

# 采集列表数据
# for col_id in range(0, 10):
# contents_list_data(col_id)

# 采集新闻数据
# contents_data()

# 测试更新缩略图资源
# update_thumb()

#测试更新json
get_news_latest_data()